<%-- 
    Document   : newWarehouse
    Created on : May 14, 2010, 10:40:36 PM
    Author     : longdm
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%--
    This file is an entry point for JavaServer Faces application.
--%>
<f:view>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>New Warehouse page</title>
    </head>
    <body>
        <h1><h:outputText value="Register a new Warehouse" /></h1>
        <img src="images/Koenigsegg.jpg" alt="images" height="269" width="619"/>
        <h:form>
            <h:panelGrid columns="2">
                <h:outputText value="Warehouse name:" />
                <h:inputText value="#{WarehouseController.currentWarehouse.warehouseName}"/>

                <h:outputText value="Warehouse location:" />
                <h:inputText value="#{WarehouseController.currentWarehouse.location}"/>

                <h:outputText value="Company"/>
                <h:selectOneMenu value="#{WarehouseController.currentWarehouse.companyId}" converter="companyConverter">
                    <f:selectItems value="#{WarehouseController.companySelectItems}"/>
                </h:selectOneMenu>

                <h:commandButton action="#{WarehouseController.newWarehouse}" value="Register"/>
                <h:commandButton action="warehouseManager" value="Cancel"/>
            </h:panelGrid>
        </h:form>
    </body>
</html>
</f:view>
